<h1>Editer un incident</h1>

<fieldset>
	<legend> Editer un incident </legend>

	<% form_for(@incident) do |f| %>
	  <%= f.error_messages %>

	   <p>
		<%= f.label :machine_id %><br />
		<%= f.select :machine_id, Machine.find(:all,:order=>'nom_machine').collect{|c| [c.nom_machine,c.id]} %>
	  </p>
	  <p>
		<%= f.label :type_incident_id %><br />
		<%= f.select :type_incident_id, TypeIncident.find(:all,:order=>'designation').collect{|c| [c.designation,c.id]} %>
	  </p>
	 
	   <p>
		<%= f.label :Info_complementaire%><br />
		<%= text_area(:incident, :info_complementaire, :cols => 40, :rows => 5, :class => 'textarea')%>

	  </p>
	  <p>
		<%= f.label :date_detection %><br />
		<%= f.datetime_select :date_detection %>
	  </p>
	  <p>
		<%= f.label :date_resolution %><br />
		<%= f.datetime_select :date_resolution %>
	  </p>
	  <p>
		<%= f.submit 'Update' %>
	  </p>
	<% end %>

	<%= link_to 'Show', @incident %> |
	<%= link_to 'Back', incidents_path %>
</fieldset>